package com.inspection.controller;

import com.inspection.model.dto.InspectionChartDTO;
import com.inspection.model.vo.chart.InspectionEcologyCycleVO;
import com.inspection.model.vo.chart.InspectionEventCorrectInfoVO;
import com.inspection.model.vo.chart.InspectionExecuteDeptAnalyzeVO;
import com.inspection.model.vo.chart.InspectionExecuteDeptVO;
import com.inspection.service.InspectionChartService;
import com.inspection.support.Wrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhaoqi
 * @since 2020-12-03
 */
@RestController
public class InspectionChartController {

    @Autowired
    private InspectionChartService inspectionChartService;

    //生态指数
    //获取纪检考核下例 最近四个季度的数据  以所有的4位数的二级条 作为维度

    @RequestMapping("/inspect/chart/ecology")
    public Wrapper<InspectionEcologyCycleVO> ecology(@RequestBody InspectionChartDTO dto) {
        return Wrapper.ok(inspectionChartService.ecology(dto));
    }


    //考核部门的事件数分析
    @RequestMapping("/inspect/chart/executeDept")
    public Wrapper<InspectionExecuteDeptAnalyzeVO> executeDeptAnalyze(@RequestBody InspectionChartDTO dto) {
        return Wrapper.ok(inspectionChartService.executeDeptAnalyze(dto));
    }

    //支部整改分析
    @RequestMapping("/inspect/chart/eventCorrect")
    public Wrapper<InspectionEventCorrectInfoVO> eventCorrectAnalyze(@RequestBody InspectionChartDTO dto) {
        return Wrapper.ok(inspectionChartService.eventCorrectAnalyze(dto));
    }


  
}
